create procedure cms_sp_ModuleSave
(
	@Id int,
	@SiteGroupId int,
    @SiteId int,
    @PackageId int,
    @ModuleName nvarchar(250),
    @ModuleDescription nvarchar(max),
    @ModuleViewParameters xml,
    @ModuleCommonParameters xml,
    @CreatedBy int,
    @DateCreated datetime,
    @LastUpdatedBy int,
    @DateLastUpdated datetime
)
as
begin
update [dbo].[Modules]
set [SiteGroupId] = @SiteGroupId
    ,[SiteId] = @SiteId
    ,[PackageId] = @PackageId
    ,[ModuleName] = @ModuleName
    ,[ModuleDescription] = @ModuleDescription
    ,[ModuleViewParameters] = @ModuleViewParameters
    ,[ModuleCommonParameters] = @ModuleCommonParameters
    ,[CreatedBy] = @CreatedBy
    ,[DateCreated] = @DateCreated
    ,[LastUpdatedBy] = @LastUpdatedBy
    ,[DateLastUpdated] = @DateLastUpdated
     where ModuleId = @Id
end           
GO


